package com.hulk.hyena.project.monitor.online.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hulk.hyena.framework.web.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 当前在线会话 sys_user_online
 * 
 * @author hulk
 */
@ToString(callSuper = true)
public class UserOnline extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    /** 用户会话id */
    private String sessionId;

    /** 部门名称 */
    private String deptName;

    /** 登录名称 */
    @Getter
    @Setter
    private String loginId;

    /** 登录IP地址 */
    @Getter
    @Setter
    private String ip;

    /** 登录地址 */
    @Getter
    @Setter
    private String loginLocation;

    /** 浏览器类型 */
    private String browser;

    /** 操作系统 */
    private String os;

    @Getter
    @Setter
    private Long operationTime    ;
    @Getter
    @Setter
    private String nickName          ;
    @Getter
    @Setter
    private String tips   ;

    /** 超时时间，单位为分钟 */
    @Getter
    @Setter
    private Long expiryMinute;

    /** session创建时间 */
    @Getter
    @Setter
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTimestamp;

    /** session最后访问时间 */
    @Getter
    @Setter
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastAccessTime;


    /** ONLINE在线OFFLINE离线*/
    private OnlineSession.OnlineStatus status = OnlineSession.OnlineStatus.ONLINE;

    /** 备份的当前用户会话 */
    private OnlineSession session;

    public String getSessionId()
    {
        return sessionId;
    }

    public void setSessionId(String sessionId)
    {
        this.sessionId = sessionId;
    }

    public String getDeptName()
    {
        return deptName;
    }

    public void setDeptName(String deptName)
    {
        this.deptName = deptName;
    }





    public String getBrowser()
    {
        return browser;
    }

    public void setBrowser(String browser)
    {
        this.browser = browser;
    }

    public String getOs()
    {
        return os;
    }

    public void setOs(String os)
    {
        this.os = os;
    }



    public OnlineSession.OnlineStatus getStatus()
    {
        return status;
    }

    public void setStatus(OnlineSession.OnlineStatus status)
    {
        this.status = status;
    }

    public OnlineSession getSession()
    {
        return session;
    }

    public void setSession(OnlineSession session)
    {
        this.session = session;
    }



}
